<h1>Listing visitors</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Phone</th>
    <th>Email</th>
    <th>Visits</th>
  </tr>

<% @visitors.each do |visitor| %>
  <tr>
    <td><%=h visitor.name %></td>
    <td><%=h visitor.phone %></td>
    <td><%=h visitor.email %></td>
    <td><%=h visitor.visits %></td>
    <td><%= link_to 'Show', visitor %></td>
    <td><%= link_to 'Edit', edit_visitor_path(visitor) %></td>
    <td><%= link_to 'Destroy', visitor, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New visitor', new_visitor_path %>